import BaseView from "./BaseView";
import UIManager from "../../ui/UIManager";
import ActionHelper from "../../action/ActionHelper";

export default class BaseToastView extends BaseView {




    onEnable(){
        this.node.opacity = 255;
        ActionHelper.toastAction(this.node,()=>{
            this.close();
        });          
    }

    onDisable(){
        this.node.position = cc.v2(0,0);
        this.node.stopAllActions();
    }

    // override.
    show() {
        UIManager.instance().pushToast(this);
    }
}
